﻿<common:LayoutAwarePage
    x:Name="pageRoot"
    x:Class="Music.SubGroupedItemsPageTwo"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Music"
    xmlns:data="using:Music.Data"
    xmlns:common="using:Music.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Page.TopAppBar>
        <AppBar x:Name="TopApp" Padding="10,0,10,0" MinHeight="110" Background="#FF040909" BorderBrush="#FF040909">
            <Grid Margin="40,0">
                <StackPanel Margin="0" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Left">
                    <Button x:Name="btnHome" Tag="Home" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Center" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="0,10,15,10" Tapped="btnHome_Tapped_1">
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="106" Margin="0" Width="71" Background="#00464646">
                            <Image Source="Assets/Appbar/TopAppBar1.png" Margin="0"/>
                        </Grid>
                    </Button>
                    <Button x:Name="btnTop20" Tag="Top 20" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Center" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="15,10" Tapped="btnTop20_Tapped_1" >
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="106" Margin="0" Width="71" Background="#00464646">
                            <Image Source="Assets/Appbar/TopAppBar2.png" Margin="0"/>
                        </Grid>
                    </Button>
                    <Button x:Name="btnFeaturedPlaylist" Tag="FeaturedPlaylist" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Center" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="15,10" Tapped="btnFeaturedPlaylist_Tapped_1"  >
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="106" Margin="0" Width="71" Background="#00464646">
                            <Image Source="Assets/Appbar/TopAppBar3.png" Margin="0"/>
                        </Grid>
                    </Button>
                    <Button x:Name="btnArtists" Tag="Artists" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Center" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="15,10" Tapped="btnArtists_Tapped_1" >
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="106" Margin="0" Width="71" Background="#00464646">
                            <Image Source="Assets/Appbar/TopAppBar4.png" Margin="0"/>
                        </Grid>
                    </Button>
                    <Button x:Name="btnGenres" Tag="Genres" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Center" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="15,10" Tapped="btnGenres_Tapped_1" >
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="106" Margin="0" Width="71" Background="#00464646">
                            <Image Source="Assets/Appbar/TopAppBar5.png" Margin="0"/>
                        </Grid>
                    </Button>
                    <Button x:Name="btnLastAdded" Tag="Last Added" HorizontalAlignment="Right" BorderBrush="{x:Null}" BorderThickness="0" FontWeight="Normal" VerticalAlignment="Center" Padding="0" Style="{StaticResource TopAppbarBtnStyle}" Margin="15,10" Tapped="btnLastAdded_Tapped_1"  >
                        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Height="106" Margin="0" Width="71" Background="#00464646">
                            <Image Source="Assets/Appbar/TopAppBar6.png" Margin="0"/>
                        </Grid>
                    </Button>
                </StackPanel>
            </Grid>
        </AppBar>
    </Page.TopAppBar>

    <Page.BottomAppBar>
        <AppBar x:Name="BottamApp" Padding="5,0" MinHeight="90" Background="#FF040909" BorderBrush="#FF040909">
            <StackPanel Margin="0,10" Orientation="Horizontal" HorizontalAlignment="Center">
            	<RadioButton x:Name="rbtnA" Content="A" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold"/>
            	<RadioButton x:Name="rbtnB" Content="B" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnC" Content="C" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnD" Content="D" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnE" Content="E" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnF" Content="F" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnG" Content="G" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnH" Content="H" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnI" Content="I" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnJ" Content="J" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnK" Content="K" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnL" Content="L" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnM" Content="M" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnN" Content="N" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnO" Content="O" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnP" Content="P" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnQ" Content="Q" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnR" Content="R" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnS" Content="S" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnT" Content="T" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnU" Content="U" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnV" Content="V" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnW" Content="W" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnX" Content="X" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnY" Content="Y" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            	<RadioButton x:Name="rbtnZ" Content="Z" VerticalAlignment="Center" Style="{StaticResource btmAppBarRadioButtonStyle}" HorizontalAlignment="Left" Width="38" Height="38" Padding="0" FontSize="16" FontWeight="Bold" Margin="1,0,0,0"/>
            </StackPanel>
        </AppBar>
    </Page.BottomAppBar>

    <Page.Resources>

        <!--
            Collection of grouped items displayed by this page, bound to a subset
            of the complete item list because items in groups cannot be virtualized
        -->
        <CollectionViewSource
            x:Name="groupedItemsViewSource"
            Source="{Binding Groups}"
            IsSourceGrouped="true"
            ItemsPath="TopItems"
            d:Source="{Binding AllGroups, Source={d:DesignInstance Type=data:SubGroupTwoDataSource, IsDesignTimeCreatable=True}}"/>
    </Page.Resources>

    <!--
        This grid acts as a root panel for the page that defines two rows:
        * Row 0 contains the back button and page title
        * Row 1 contains the rest of the page layout
    -->
    <Grid Style="{StaticResource LayoutRootStyle}">
	<Grid.Background>
    		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    			<GradientStop Color="#FF020508"/>
    			<GradientStop Color="#FF1B2C2E" Offset="1"/>
    		</LinearGradientBrush>
    	</Grid.Background>

        <Grid.RowDefinitions>
            <RowDefinition Height="140"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!-- Horizontal scrolling grid used in most view states -->
        <GridView
            x:Name="itemGridView"
            AutomationProperties.AutomationId="ItemGridView"
            AutomationProperties.Name="Grouped Items"
            Grid.RowSpan="2"
            Padding="116,137,40,46"
            ItemsSource="{Binding Source={StaticResource groupedItemsViewSource}}"
            ItemTemplate="{StaticResource ArtistsPageItemTemplate}"
            SelectionMode="None"
            IsSwipeEnabled="false"
            IsItemClickEnabled="True"
            ItemClick="ItemView_ItemClick">

            <GridView.ItemsPanel>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel Orientation="Horizontal"/>
                </ItemsPanelTemplate>
            </GridView.ItemsPanel>
            <GridView.GroupStyle>
                <GroupStyle>
                    <GroupStyle.HeaderTemplate>
                        <DataTemplate>
                            <Grid Margin="1,0,0,6">
                                <!--<Button
                                    AutomationProperties.Name="Group Title"
                                    Click="Header_Click"
                                    Style="{StaticResource TextPrimaryButtonStyle}" >
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="{Binding Title}" Margin="3,-7,10,10" Style="{StaticResource GroupHeaderTextStyle}" />
                                        <TextBlock Text="{StaticResource ChevronGlyph}" FontFamily="Segoe UI Symbol" Margin="0,-7,0,10" Style="{StaticResource GroupHeaderTextStyle}"/>
                                    </StackPanel>
                                </Button>-->
                            </Grid>
                        </DataTemplate>
                    </GroupStyle.HeaderTemplate>
                    <GroupStyle.Panel>
                        <ItemsPanelTemplate>
                            <VariableSizedWrapGrid Orientation="Vertical" Margin="0,0,80,0"/>
                        </ItemsPanelTemplate>
                    </GroupStyle.Panel>
                </GroupStyle>
            </GridView.GroupStyle>
        </GridView>

        <!-- Vertical scrolling list only used when snapped -->
        <ListView
            x:Name="itemListView"
            AutomationProperties.AutomationId="ItemListView"
            AutomationProperties.Name="Grouped Items"
            Grid.Row="1"
            Visibility="Collapsed"
            Margin="0,-10,0,0"
            Padding="10,0,0,60"
            ItemsSource="{Binding Source={StaticResource groupedItemsViewSource}}"
            ItemTemplate="{StaticResource ArtistsPageItemTemplate}"
            SelectionMode="None"
            IsSwipeEnabled="false"
            IsItemClickEnabled="True"
            ItemClick="ItemView_ItemClick" ItemContainerStyle="{StaticResource ListViewItemStyle1}">

            <ListView.GroupStyle>
                <GroupStyle>
                    <GroupStyle.HeaderTemplate>
                        <DataTemplate>
                            <Grid Margin="7,7,0,0">
                              <!--  <Button
                                    AutomationProperties.Name="Group Title"
                                    Click="Header_Click"
                                    Style="{StaticResource TextPrimaryButtonStyle}">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock Text="{Binding Title}" Margin="3,-7,10,10" Style="{StaticResource GroupHeaderTextStyle}" />
                                        <TextBlock Text="{StaticResource ChevronGlyph}" FontFamily="Segoe UI Symbol" Margin="0,-7,0,10" Style="{StaticResource GroupHeaderTextStyle}"/>
                                    </StackPanel>
                                </Button>-->
                            </Grid>
                        </DataTemplate>
                    </GroupStyle.HeaderTemplate>
                </GroupStyle>
            </ListView.GroupStyle>
        </ListView>

        <!-- Back button and page title -->
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="backButton" Click="GoBack" IsEnabled="{Binding Frame.CanGoBack, ElementName=pageRoot}" Style="{StaticResource BackButtonStyle}"/>
            <TextBlock x:Name="pageTitle" Text="{StaticResource AppName}" Grid.Column="1" IsHitTestVisible="false" Style="{StaticResource PageHeaderTextStyle}"/>
            <Image x:Name="image" HorizontalAlignment="Right" VerticalAlignment="Center" Width="212" Source="Assets/HubPage/Logo.png" Margin="0,20,40,20" Grid.Column="1"/>
        </Grid>

        <VisualStateManager.VisualStateGroups>

            <!-- Visual states reflect the application's view state -->
            <VisualStateGroup x:Name="ApplicationViewStates">
                <VisualState x:Name="FullScreenLandscape"/>
                <VisualState x:Name="Filled"/>

                <!-- The entire page respects the narrower 100-pixel margin convention for portrait -->
                <VisualState x:Name="FullScreenPortrait">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PortraitBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>

                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="itemGridView" Storyboard.TargetProperty="Padding">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="96,137,10,56"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnA">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnB">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnC">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnD">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnE">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnF">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnG">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnH">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnI">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnJ">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnK">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnL">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnM">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnN">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnO">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnP">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnQ">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnR">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnS">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnT">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnU">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnV">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnW">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnX">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnY">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="rbtnZ">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<x:Double>28</x:Double>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>

                <!--
                    The back button and title have different styles when snapped, and the list representation is substituted
                    for the grid displayed in all other view states
                -->
                <VisualState x:Name="Snapped">
                    <Storyboard>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="backButton" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedBackButtonStyle}"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="pageTitle" Storyboard.TargetProperty="Style">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource SnappedPageHeaderTextStyle}"/>
                        </ObjectAnimationUsingKeyFrames>

                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="itemListView" Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="itemGridView" Storyboard.TargetProperty="Visibility">
                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed"/>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Padding)" Storyboard.TargetName="itemListView">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Thickness>42,0,0,60</Thickness>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Collapsed</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="TopApp">
                        	<DiscreteObjectKeyFrame KeyTime="0">
                        		<DiscreteObjectKeyFrame.Value>
                        			<Visibility>Collapsed</Visibility>
                        		</DiscreteObjectKeyFrame.Value>
                        	</DiscreteObjectKeyFrame>
                        </ObjectAnimationUsingKeyFrames>
                    </Storyboard>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>
</common:LayoutAwarePage>
